//
//  DDMainTabBarController.m
//  DDMusic
//
//  Created by rimi on 16/11/8.
//  Copyright © 2016年 FengBaoFamily. All rights reserved.
//
/*****************这是主框架标签栏************************/
#import "DDMainTabBarController.h"
#import "DDMainTabBar.h"
#import "DDMainMusicViewController.h"
@interface DDMainTabBarController ()

@end

@implementation DDMainTabBarController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self addChildVC];
  
#pragma mark KVC赋值自定义标签栏
    DDMainTabBar* mainTabBar = [DDMainTabBar sharedDDMainTabBar];
    [self setValue:mainTabBar forKey:@"tabBar"];
    
}
- (void)viewWillAppear:(BOOL)animated{
    self.tabBar.barTintColor = [UIColor blackColor];
}
#pragma mark 添加子控制器
- (void)addChildVC{
    DDMainMusicViewController* mainMusicViewController = [[DDMainMusicViewController alloc]init];
    UINavigationController* navigationVC = [[UINavigationController alloc]initWithRootViewController:mainMusicViewController];
    [self addChildViewController:navigationVC];
//设置导航栏样式
    mainMusicViewController.title = @"音乐";
    [navigationVC.navigationBar setTitleTextAttributes:@{NSFontAttributeName:[UIFont systemFontOfSize:24 weight:4],NSForegroundColorAttributeName:[UIColor whiteColor]}];
    navigationVC.navigationBar.tintColor = [UIColor whiteColor];
    navigationVC.navigationBar.barStyle = UIBarStyleBlack;
    [navigationVC.navigationBar setBackgroundImage:[UIImage imageNamed:@"navigationBarImage"] forBarMetrics:(UIBarMetricsDefault)];

    

    
    
}



@end
